CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
PROJECT(GC)

FIND_PACKAGE(ITK REQUIRED)
INCLUDE(${ITK_USE_FILE})

INCLUDE_DIRECTORIES(./)
INCLUDE_DIRECTORIES(./utils/)
INCLUDE_DIRECTORIES(./utils/cuts/)
INCLUDE_DIRECTORIES(./utils/pathxml/)
INCLUDE_DIRECTORIES(./utils/correlation/)

SET(CMAKE_CXX_FLAGS "-fopenmp")

ADD_EXECUTABLE(cut3D main.cxx greedy.cxx operation.cxx debug.cxx gc.cxx util.cxx prep.cxx construct.cxx segment.cxx vis.cxx xml.cxx utils/cuts/graph.cpp utils/cuts/instances.inc utils/cuts/maxflow.cpp utils/pathxml/Path.cxx utils/tinyxml/tinyxml.cpp utils/tinyxml/tinystr.cpp utils/tinyxml/tinyxmlerror.cpp utils/tinyxml/tinyxmlparser.cpp utils/correlation/CalcCorrelations.cxx)
TARGET_LINK_LIBRARIES(cut3D ${ITK_LIBRARIES})

ADD_EXECUTABLE(gen_area_file utils/gadgets/gen_area_file.cxx util.cxx)
TARGET_LINK_LIBRARIES(gen_area_file ${ITK_LIBRARIES})

ADD_EXECUTABLE(evaluate_path utils/gadgets/evaluate_path.cxx gc.cxx util.cxx prep.cxx construct.cxx segment.cxx vis.cxx xml.cxx utils/cuts/graph.cpp utils/cuts/instances.inc utils/cuts/maxflow.cpp utils/pathxml/Path.cxx utils/tinyxml/tinyxml.cpp utils/tinyxml/tinystr.cpp utils/tinyxml/tinyxmlerror.cpp utils/tinyxml/tinyxmlparser.cpp utils/correlation/CalcCorrelations.cxx)
TARGET_LINK_LIBRARIES(evaluate_path ${ITK_LIBRARIES})

ADD_EXECUTABLE(evaluate_path_pointwise utils/gadgets/evaluate_path_pointwise.cxx gc.cxx util.cxx prep.cxx construct.cxx segment.cxx vis.cxx xml.cxx utils/cuts/graph.cpp utils/cuts/instances.inc utils/cuts/maxflow.cpp utils/pathxml/Path.cxx utils/tinyxml/tinyxml.cpp utils/tinyxml/tinystr.cpp utils/tinyxml/tinyxmlerror.cpp utils/tinyxml/tinyxmlparser.cpp utils/correlation/CalcCorrelations.cxx)
TARGET_LINK_LIBRARIES(evaluate_path_pointwise ${ITK_LIBRARIES})

ADD_EXECUTABLE(find_initial utils/gadgets/find_initial.cxx gc.cxx util.cxx prep.cxx construct.cxx segment.cxx vis.cxx xml.cxx utils/cuts/graph.cpp utils/cuts/instances.inc utils/cuts/maxflow.cpp utils/pathxml/Path.cxx utils/tinyxml/tinyxml.cpp utils/tinyxml/tinystr.cpp utils/tinyxml/tinyxmlerror.cpp utils/tinyxml/tinyxmlparser.cpp utils/correlation/CalcCorrelations.cxx)
TARGET_LINK_LIBRARIES(find_initial ${ITK_LIBRARIES})

ADD_EXECUTABLE(vis_truth_path utils/gadgets/vis_truth_path.cxx gc.cxx util.cxx prep.cxx construct.cxx segment.cxx vis.cxx xml.cxx utils/cuts/graph.cpp utils/cuts/instances.inc utils/cuts/maxflow.cpp utils/pathxml/Path.cxx utils/tinyxml/tinyxml.cpp utils/tinyxml/tinystr.cpp utils/tinyxml/tinyxmlerror.cpp utils/tinyxml/tinyxmlparser.cpp utils/correlation/CalcCorrelations.cxx)
TARGET_LINK_LIBRARIES(vis_truth_path ${ITK_LIBRARIES})

ADD_EXECUTABLE(convert utils/gadgets/convert.cxx gc.cxx util.cxx prep.cxx construct.cxx segment.cxx vis.cxx xml.cxx utils/cuts/graph.cpp utils/cuts/instances.inc utils/cuts/maxflow.cpp utils/pathxml/Path.cxx utils/tinyxml/tinyxml.cpp utils/tinyxml/tinystr.cpp utils/tinyxml/tinyxmlerror.cpp utils/tinyxml/tinyxmlparser.cpp utils/correlation/CalcCorrelations.cxx)
TARGET_LINK_LIBRARIES(convert ${ITK_LIBRARIES})
